//2. 创建组件
//3. 定义路由
import home from "../components/home"
import news from "../components/news"
import message from "../components/message"
import messageDetail from "../components/messageDetail"
const routes = [
  {
    path:"/home",
    component:home,
    children:[
      {path:"news",component:news},
      {
        path:"message",
        component:message,
        children:[
          {
            name:"messageDetail",
            path:":id",
            component:messageDetail,
            props:true
          }
        ]
      },
      {path:"",redirect:"news"},
    ]
  },
  {path:"/",redirect:"/home"}
]

export default routes
